#include<stdio.h>
#include<string.h>
#include <algorithm>
#include<iostream>
using namespace std;
int main()
{
	int n, m, flag, sum;
	cin >> n >> m;
	flag = sum = 0;
	while (n)
	{
		if (n % 2)
		{
			if (flag)cout << " + ";
			cout << m;
			sum += m;
			n = (n - 1) / 2;
			m *= 2;
			flag = 1;
		}
		else
		{
			n /= 2;
			m *= 2;
		}
	}
	cout << " = " << sum << endl;
	return 0;
}